package com.bjsxt.chapter6_proxy.dynamicProxy;

import java.lang.reflect.Proxy;

/**
 * @ClassName Client
 * @Description 客户端
 * @Author 黑马程序员
 * @Date 16:54 2024/6/21
 * @Version 1.0
 **/
public class Client {
    public static void main(String[] args) {
        RealStar realStar = new RealStar();
        StarHandler handler = new StarHandler(realStar);
        Star proxy = (Star) Proxy.newProxyInstance(
                ClassLoader.getSystemClassLoader(), new Class[]{Star.class}, handler);
        proxy.sing();
    }
}
